Skip to content

It's now possible to delete a service that is not connected to a Load Balancer - #78

Open
coredumperror wants to merge 1 commit into
masterfrom
deletion-of-unconnected-services
Open

It's now possible to delete a service that is not connected to a Load Balancer#78
coredumperror wants to merge 1 commit into
masterfrom
deletion-of-unconnected-services

Conversation

@coredumperror

Copy link
Copy Markdown
Collaborator

Previously, the deploy service delete command would crash with an IndexError if the user tried to delete a service that had already been disconnected from its load balancer.

Now, the delete command will get past that, correctly report that there is no listener rule connected to the service's target group, and successfully delete the ECS service.

I used this updated version successfully to delete several services that had already been disconnected from their respective load balancers, and as far as I can tell, it worked flawlessly.

… Balancer

Previously, the `deploy service delete` command would crash with an IndexError if the user tried to delete a service that had already been disconnected from its load balancer.
Now, the delete command will get past that, correctly report that there is no listener rule connected to the service's target group, and successfully delete the ECS service.
@cmalek

cmalek commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

As usual, please write tests for this:

  • One or more tests to show that the patch will still disconnect a service from its target group that is still attached to a listener rule -> listener -> ALB
  • Ensure you cover NLBs also -- deployfish has different paths for NLBs and ALBs IIRC. The connection here would go listener -> NLB I believe. You'll have to change the code
  • One or more tests to show that the patch will delete a service whose target-group is no longer attached to a listener or listener rule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants